package com.example.mybatis.mapper;

import com.example.common.pojo.MyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
//import javax.persistence.Column;
//import javax.persistence.GeneratedValue;
//import javax.persistence.Id;
//import javax.persistence.Table;
//import org.hibernate.validator.constraints.NotEmpty;

@Mapper
public interface StudentDao {
    int deleteByPrimaryKey(Long id);

    int insertSelective(MyEntity record);

    MyEntity selectByPrimaryKey(Long id);

    @Select("select * from my_entity where id = ${id}")
    MyEntity selectByPrimaryKeyDynamic(@Param("id") Long id);

    int updateByPrimaryKeySelective(MyEntity record);

    List<MyEntity> selectList();

    MyEntity selectOneByInjected(String studentName);
}